﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;
using System.Web.Mvc;

namespace LOMBARDISPICK.Domain.Infrastructure
{
	public interface IService<T> where T : class
	{
		IEnumerable<T> getAll();
		IEnumerable<T> getMany(Expression<Func<T, bool>> where);
		IEnumerable<T> getManySorted(Expression<Func<T, bool>> where);
		IEnumerable<T> getAllSorted();
		T getById(int id);
		void create(T entity);
		void delete(int id);
		void save();


		SelectList ViewDataSelectLists();
		SelectList ViewDataSelectLists(int versionID);
		SelectList ViewDataSelectLists(Expression<Func<T, bool>> where);
		SelectList ViewDataSelectLists(Expression<Func<T, bool>> where, int versionID);
		SelectList ViewDataSelectListsWithDefaultValue(int id);
		SelectList ViewDataSelectListsWithDefaultValue(int id, int versionID);
		SelectList ViewDataSelectListsWithDefaultValue(Expression<Func<T, bool>> where, int id);
		SelectList ViewDataSelectListsWithDefaultValue(Expression<Func<T, bool>> where, int id, int versionID);
		String ViewDataDefaultValue(int id);
		SelectList ViewDataSelectListsWithDefaultValue(int? id);
		SelectList ViewDataSelectListsWithDefaultValue(int? id, int versionID);
		String ViewDataDefaultValue(int? id);
		IEnumerable<SelectListItem> getSelectList();
		IEnumerable<SelectListItem> getSelectList(int versionID);
		IEnumerable<SelectListItem> getManySelectList(Expression<Func<T, bool>> where);
		IEnumerable<SelectListItem> getManySelectList(int versionID, Expression<Func<T, bool>> where);
		Func<T, SelectListItem> StandardSelectListOptionsExpression(bool IsSelected);
		//IEnumerable<SelectListItem> getSelectList(Expression<Func<T, bool>> whereFilter);
		//IEnumerable<SelectListItem> getSelectList(Expression<Func<T, bool>> whereFilter, int versionID);
	}
}